<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>接口调试</title>
	<link href="source/css/base.css" rel="stylesheet" type="text/css" />
	<link href="source/others/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="source/css/plug.css" rel="stylesheet" type="text/css" />
	<link href="source/others/jquery-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="source/others/jquery.jsonview.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<input id="id-page-name" type="hidden" value="debug">
	<div class="h40 CFFF pl20 w shadow fixed z10" style="background:#233050;">
		<a id="id-advertisement-href" href="http://api.crap.cn" target="_blank">
			<img id="id-advertisement-img" src="logo.png" class="h30 mt4 ml10 fl">
			<button id="id-advertisement-text" class="btn btn-menu btn-sm fl cursor ml10 ndis"></button>
		</a>
		<button class="btn btn-menu btn-sm fl mr10 cursor ml20" id="left-enlarge">
			菜单 &nbsp;<div class="fr mt-1"><i class="iconfont">&#xe699;</i></div>
		</button>

        <div class="fl mr10 mt5 ml20 ndis f12 pt5 fb CFFF" id="id-user-name"></div>

        <a id="id-login" target="_blank" class="btn btn-menu btn-sm fr mr10">登录</a>
        <a id="id-logout" href="#" class="btn btn-menu btn-sm fr mr10">注销</a>
		<a href="json.html" target="_blank" class="btn btn-menu btn-sm fr mr10">Json工具</a>
		<button id="new-interface" class="btn btn-menu btn-sm fr mr10">新接口</button>

		<div class="btn-group fr mr10">
			<button type="button" class="btn btn-menu btn-sm" id="id-refresh-project">
                <i class="iconfont pl10 mt-3" id="synch-ico">&#xe6aa;</i>
                <span id="id-def-project-name">请选着项目</span>
            </button>
			<button type="button" class="btn btn-menu btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				<span class="caret"></span>
				<span class="sr-only">项目列表</span>
			</button>
			<ul id="id-project-list" class="dropdown-menu min-w80">
				<li><a href="#" class="pl10 pr10">切换项目</a></li>
                <li role="separator" class="divider pl10 pr10"></li>
			</ul>
		</div>
		<div class="fr btn btn-menu btn-sm mr10 pt1 pb1" style="display: none;" id="id-tip">ddd</div>

	</div>

	<div class="w h pt40 fixed min-w900" id="content">

		<!-- *****************************left************************************ -->
		<div id="left" class="BGEEE h m0 fl p0 shadow ofy-a" style="width:18%;">
            <!--接口请求头、参数等切换标签-->
            <div class="bb1 h40 mt40 f12 C555 pt10">
				<div class="bb3 fl w-50 tc h30 cursor" id="modules-title" title="Module">模块</div>
				<div class="fl w-50 tc h30 cursor" id="history-title" title="History">历史</div>
            </div>
			<!--历史记录 -->
			<div id="history" class="none w"></div>
			<!--模块-->
			<div id="modules" class="w panel-group mb0" role="tablist"></div>
        </div>
		<!-- ****************************left end*********************************** -->

		<div id="right" class="BGF5 h m0 fr p0 ofy-s fl"  style="width:82%;">

			<!--顶部空白-->
			<div class="BGF9 h40 w"></div>

			<div class="cb"></div>

			<!-- 接口标题 -->
			<div id="id-interface-titles" class="p5 pl10 BGFFF w z20"></div>


			<div class="w h mt10 l pt20" id="id-welcome">
				<iframe class="h w b0" src="http://api.crap.cn/plugDashboard.htm"></iframe>
			</div>

			<div class="cb"></div>
			<!--参数、头、相应结果-->
			<div class="w h mt10 rel none " id="id-interface-div">

				<!--接口标题-->
				<div class="mt10 ml10 fb bl3 f14 pl10 tl pr10">
					<input type="text" class="form-control b0 r2 BGF5 p3 h27" id="id-interface-name" placeholder="请输入接口名"/>
					<input type="hidden" class="form-control b0 r2 BGF5 p3 h27" id="id-interface-id" value="-1"/>
					<input type="hidden" class="form-control b0 r2 BGF5 p3 h27" id="id-module-id" value="-1"/>
				</div>
				<!--接口URL-->
				<table class="w mt10">
						<tr>
							<td class="w100 pr10 pl10">
								<select class="form-control" id="id-method">
									<option value="GET">GET</option>
									<option value="POST">POST</option>
									<option value="PUT">PUT</option>
									<option value="DELETE">DELETE</option>
								</select>
							</td>
							<td class="pr10">
								<div class="input-group">
								  <input type="text" class="form-control" id="id-url" placeholder="Enter request URL">
								  <span class="input-group-addon cursor btn-main" id="send"><i class="iconfont">&#xe634;</i> 发送请求</span>
								</div>
							</td>
						</tr>
				</table>

				<!--接口请求头、参数等切换标签-->
				<div class="h30 mt10 shadow-b pl10 C555">
					<div class="params-title menu-title" data-stage="headers-div">
						请求头信息 <a class="cursor C999" target="_blank" href="http://api.crap.cn/index.do#/article/detail?projectId=help&moduleId=155032424248009000006&type=ARTICLE&id=157215219736301001690"><i class="iconfont">&#xe6a3;</i></a>
					</div>
                    <div class="params-title menu-title bb3" data-stage="params-div">
						请求参数 <a class="cursor C999" target="_blank" href="http://api.crap.cn/index.do#/article/detail?projectId=help&moduleId=155032424248009000006&type=ARTICLE&id=157215221549201001691"><i class="iconfont">&#xe6a3;</i></a>
					</div>
				</div>

                <!--请求头-->
                <div class="p10 bt1 bb1 none" id="headers-div">
                    <table class="params-headers-table f12 w"  id="headers-table">
					<thead>
							<tr class="fb">
								<td class="p5" style="width:30%">
									Key
								</td>
								<td class="p5" colspan="2">
									 Value
									 <a id="id-headers-bulk-edit" class="bulk-edit fr mr20 color-main cursor" crap-data-header-or-param="headers">Bulk Edit</a>
								</td>
							</tr>
						</thead>
						<tbody>
							<tr class="last">
								<td>
									<input type="text" class="form-control" data-stage="key">
								</td>
								<td>
									<input type="text" class="form-control" data-stage="value">
								</td>
								<td class="w20"><i class="iconfont">&#xe69a;</i></td>
							</tr>
						</tbody>
                    </table>
					
					<div id="headers-bulk-edit-div" class="f12 none">
							<a class="key-value-edit fr  mr20 color-main cursor fb" crap-data-header-or-param="headers">Key-Value Edit</a>
							<textarea id="id-headers-bulk-value" class="form-control w BGFFF min-h100 max-w" placeholder="key:value"></textarea>
					</div>
                </div>
				<!--请求头-->

                <!--参数-->
                <div class="bb1" id="params-div">
                    <div id="id-content-type" class="f12 p10 C999 pl20 none">
						<div class="fl">
							<input type="radio" name="param-type" checked  id="id-param-type"  value="application/x-www-form-urlencoded;charset=UTF-8"> x-www-form-urlencoded;charset=UTF-8&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="param-type" crap-data="customer" id="id-customer-type" value="application/json"> customer&nbsp;&nbsp;&nbsp;
						</div>
						<select class="form-control none w150 fl table-input" id="id-customer-type-select">
							<option value="application/json">application/json</option>
							<option value="text/plain">text/plain</option>
							<option value="application/xml">application/xml</option>

						</select>
						<div class="cb"></div>
					</div>

                    <div class="bt1 p10">
						<table class="params-headers-table f12 w" id="params-table">
							<thead>
							   <tr class="fb">
									<td class="p5" style="width:30%">
										Key
									</td>
									<td class="p5" colspan="2">
										 Value
										 <a id="id-params-bulk-edit" class="bulk-edit fr mr20 color-main cursor" crap-data-header-or-param="params">Bulk Edit</a>
									</td>
								</tr>
							</thead>
							<tbody>
								<tr class="last">
									<td>
										<input type="text" class="form-control" data-stage="key">
											</td>
									<td>
										<input type="text" class="form-control" data-stage="value">
									</td>
									<td class="w20"><i class="iconfont">&#xe69a;</i></td>
								</tr>
							</tbody>
						</table>

						<div id="customer-div" class=" f12 none">
							<textarea id="customer-value" class="form-control w BGFFF min-h100 max-w" placeholder=""></textarea>
						</div>

						<div id="params-bulk-edit-div" class=" f12 none">
							<a class="key-value-edit fr  mr20 color-main cursor fb" crap-data-header-or-param="params">Key-Value Edit</a>
							<textarea id="id-params-bulk-value" class="form-control w BGFFF min-h100 max-w" placeholder="key:value"></textarea>
						</div>
                    </div>
                </div>
                <!--参数：end-->

                <!--response-->
				<!--response-title-->
                <div class="bb1 h30 mt10 shadow-b pl10 C555 mb10">
                    <div class="mt10 f14 tl w">
						<div class="response-title menu-title bb3" data-stage="response-body">响应主体</div>
						<div class="response-title menu-title" data-stage="response-header">响应头</div>
						<div class="response-title menu-title" data-stage="response-cookie">Cookie</div>
						<div class="cb"></div>
					</div>
                </div>

				<!--response-menu-->
				<div class="response-body p10 pb0 pt0">
					<div class="btn-group" role="group">
						<button type="button" class="response-menu btn btn-default btn-xs" id="format-row">Row</button>
						<button type="button" class="response-menu btn btn-default btn-xs" id="format-pretty">Pretty</button>
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;Json:
					<div class="btn-group" role="group">
						<button type="button" class="response-menu response-json btn btn-default btn-xs" id="json-expand" crap-data-name="expand" crap-data-value="1">全部展开</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs" crap-data-name="collapse" crap-data-value="1">展开一级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs" crap-data-name="collapse" crap-data-value="2">展开二级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs" crap-data-name="collapse" crap-data-value="3">展开三级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs" crap-data-name="collapse" crap-data-value="4">展开四级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs" crap-data-name="nl2br" crap-data-value="true">自动换行</button>
					</div>

					<a class="btn btn-default btn-xs" target="_blank" href="https://api.crap.cn/static/help/155032426525701000007.html"><i class="iconfont">&#xe63e; Help</i></a>
				</div>
				<!--response-menu:end-->

                <div class="p10 ofy-s min-h400">

					<div class="response-body">
						<!--row-->
						<textarea id="response-row" class="form-control w h BGFFF min-h400 hidden" placeholder="Hit the Send buttom to get a response"></textarea>

						<!--pretty-->
						<div id="response-pretty" class="b1 r5 p10 BGFFF min-h400">
							<div class="tc mt100 C999"><i class="iconfont">&#xe634;</i>点击发送请求按钮调试接口~</div>
							<div class="tc C999">
								<a class="cursor C999" target="_blank" href="http://api.crap.cn/static/help/153908629593401000133.html"><i class="iconfont">&#xe6a3;</i> 点击查看帮助 </a>
							</div>
						</div>
					</div>

					<!--header-->
					<div class="response-header b1 r5 p10 min-h400 none BGFFF">
						<div class="fb">General</div>
						<div class="ml20 general"></div>
						<div class="fb mt20">Response Headers</div>
						<div class="ml20 headers"></div>
					</div>

					<!--cookie-->
					<div class="response-cookie b1 r5 p10 min-h400 none BGFFF">
						<table class="table">

						</table>

					</div>

                </div>

			</div>
		</div>
	</div>
	
	<div id="id-float" class="folat">
		<div class="sk-wave">
			<div class="sk-rect sk-rect1"></div>
			<div class="sk-rect sk-rect2"></div>
			<div class="sk-rect sk-rect3"></div>
			<div class="sk-rect sk-rect4"></div>
			<div class="sk-rect sk-rect5"></div>
		</div>
	</div>
	<div class="alert-div" id="alert-div"></div>
	<div id="fade" class="folat"></div>


	<script type="text/javascript" src="source/others/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="source/others/bootstrap.js"></script>
	<script type="text/javascript" src="source/js/constant.js"></script>
	<script type="text/javascript" src="source/js/util.js"></script>
	<script type="text/javascript" src="source/js/history-dao.js"></script>
	<script type="text/javascript" src="source/js/interface-dao.js"></script>
	<script type="text/javascript" src="source/js/base-dao.js"></script>
	<script type="text/javascript" src="source/js/project-dao.js"></script>
	<script type="text/javascript" src="source/js/module-dao.js"></script>
	<script type="text/javascript" src="source/js/plug-function.js"></script>
	<script type="text/javascript" src="source/js/crapApi.js"></script>
	<script type="text/javascript" src="source/js/adapter.js"></script>
	<script type="text/javascript" src="source/others/jquery.jsonview.js"></script>
	<script type="text/javascript" src="source/others/jquery-ui.min.js"></script>

	<script type="text/javascript" src="source/js/debug.js"></script>
	<img style="display: none" src="http://debug-acess-statistics.oss-cn-qingdao.aliyuncs.com/ca.gif">
</body>
</html>